<template>
  <div>
    <Card>
      <div slot="title">
        <div class="edit-head">
          <a @click="goBack" class="back-title">
            <Icon type="ios-arrow-back" />返回
          </a>
        </div>
      </div>
      <div>
        <!-- 货主信息 -->
        <div>
          <div
            style="display: flex; justify-content: space-between; height: 80px"
          >
            <div class="Ownerdw">
              <div class="Ownerdw-shipper">
                <span>托运人</span>
              </div>
              <div class="Ownerpoit">
                <img
                  v-show="this.cargoAvatar != ''"
                  :src="this.cargoAvatar"
                  alt=""
                  srcset=""
                />
              </div>
              <div class="OwnerName">
                <div>
                  <span>{{
                    this.goodsData.cargoOwnerInfoVo.personalName
                  }}</span>
                  <span class="OwnerName1">{{
                    this.goodsData.cargoOwnerInfoVo.mobile
                  }}</span>
                </div>

                <div class="Owner-company">
                  <span
                    v-if="this.goodsData.cargoOwnerInfoVo.companyName != ''"
                  >
                    {{ this.goodsData.cargoOwnerInfoVo.companyName }}
                  </span>
                  <span
                    style="color: #a9a9a9"
                    v-if="
                      this.goodsData.cargoOwnerInfoVo.companyName == '' ||
                      this.goodsData.cargoOwnerInfoVo.companyName == null
                    "
                  >
                    未进行企业认证</span
                  >
                </div>
              </div>
            </div>
            <div class="Ownertiem">
              <div>
                <!-- 待审核 审核失败  待执行 报价中 已关闭 已完结-->
                <span
                  :class="
                    this.goodsData.status == '0'
                      ? 'implemented'
                      : this.goodsData.status == '1'
                      ? 'AuditFailed'
                      : this.goodsData.status == '2'
                      ? 'deeltes'
                      : this.goodsData.status == '3'
                      ? 'quotation'
                      : this.goodsData.status == '4'
                      ? 'deeltes'
                      : this.goodsData.status == '5'
                      ? 'deeltes'
                      : this.goodsData.status == '-1'
                      ? 'deeltes'
                      : this.goodsData.status == '6'
                      ? 'erreCss'
                      : 'statee'
                  "
                >
                  {{
                    this.$options.filters["SOURCE_DETAIL_STATUS"](
                      this.goodsData.status
                    )
                  }}
                </span>
              </div>

              <div style="color: #999999; margin-left: 25px">
                {{ this.goodsData.createTime }}
              </div>
            </div>
          </div>
        </div>
        <div style="margin: 22px 0"></div>
        <!-- 货物信息 -->
        <div class="Line"></div>
        <div>
          <el-descriptions
            class="margin-top SourcIormation"
            title="货源信息"
            :column="4"
            size="medium"
            border
          >
            <template slot="extra">
              <Row class="operation"> </Row>
            </template>
            <!-- 地址 -->
            <el-descriptions-item>
              <template slot="label"> 装货地址： </template>
              {{ this.beginAreaCodeShow }}
            </el-descriptions-item>
            <el-descriptions-item>
              <template slot="label"> 详细地址 ： </template>
              {{ this.goodsData.beginAddress }}
            </el-descriptions-item>
            <el-descriptions-item>
              <template slot="label"> 装运范围： </template>
              {{ this.goodsData.pretendEnclosure }} km
            </el-descriptions-item>
            <el-descriptions-item>
              <template slot="label"> 发货单位： </template>
              <span
                class="NotFilled"
                v-if="
                  this.goodsData.extractName == '' ||
                  this.goodsData.extractName == null
                "
              >
                未填写
              </span>
              <span v-else>
                {{ this.goodsData.extractName }}/{{
                  goodsData.extracContactName
                }}
                /{{ goodsData.extractPhone }}
              </span>
            </el-descriptions-item>

            <el-descriptions-item>
              <template slot="label"> 卸货地址： </template>
              {{ this.endAreaCodeShow }}
            </el-descriptions-item>
            <el-descriptions-item>
              <template slot="label"> 详细地址： </template>
              {{ this.goodsData.endAddress }}
            </el-descriptions-item>
            <el-descriptions-item
              label-class-name="my-label"
              content-class-name="my-content"
            >
              <template slot="label"> 签收范围： </template>
              {{ this.goodsData.dischargeEnclosure }} km
            </el-descriptions-item>

            <el-descriptions-item>
              <template slot="label">收货单位： </template>
              <span
                class="NotFilled"
                v-if="
                  this.goodsData.takeName == '' ||
                  this.goodsData.takeName == null
                "
              >
                未填写
              </span>
              <span v-else>
                {{ this.goodsData.takeName }}/ {{ goodsData.takeContactName }}/
                {{ goodsData.takePhone }}
              </span>
            </el-descriptions-item>
          </el-descriptions>
          <!-- 装运时效 -->
          <div style="margin: 20px 0"></div>
          <el-descriptions class="margin-top" :column="4" size="medium" border>
          </el-descriptions>
          <!-- 计价方式 -->
          <div style="margin: 20px 0"></div>
          <el-descriptions class="margin-top" :column="4" size="medium" border>
            <el-descriptions-item>
              <template slot="label"> 货源编号： </template>
              {{ this.goodsData.goodNo }}
            </el-descriptions-item>

            <el-descriptions-item>
              <template slot="label"> 货品名称： </template>
              {{ this.goodsData.goodSubType }}
            </el-descriptions-item>

            <el-descriptions-item>
              <template slot="label"> 货物类型： </template>
              {{ this.goodsData.goodType | TypeGoods }}
            </el-descriptions-item>
            <el-descriptions-item>
              <template slot="label"> 运费价格： </template>
              {{ this.goodsData.freightUnitPrice }}
            </el-descriptions-item>
            <el-descriptions-item>
              <template slot="label">计价方式： </template>
              <span
                class="NotFilled"
                v-if="this.goodsData.valuationUnit == null"
              >
                未填写
              </span>
              <span v-else>
                {{
                  this.goodsData.valuationUnit == "1"
                    ? "按重量"
                    : this.goodsData.valuationUnit == "2"
                    ? "按体积"
                    : "按件数"
                }}</span
              >
            </el-descriptions-item>

            <el-descriptions-item>
              <template slot="label">发布数量： </template>
              <span>{{ this.goodsData.totalGoodWeight }}</span>
              吨
            </el-descriptions-item>
            <el-descriptions-item>
              <template slot="label">剩余数量： </template>
              <span style="color: #dc143c">{{
                this.goodsData.goodWeight
              }}</span>
              吨
            </el-descriptions-item>
            <el-descriptions-item>
              <template slot="label"> 体积： </template>
              {{ this.goodsData.volume == null ? "0" : this.goodsData.volume }}
              m³
            </el-descriptions-item>
            <el-descriptions-item>
              <template slot="label"> 件数： </template>
              {{ this.goodsData.piece == null ? "0" : this.goodsData.piece }}
              件
            </el-descriptions-item>

            <el-descriptions-item>
              <template slot="label" content-class-name="LengthContent"
                >运输要求 ：
              </template>
              <span
                class="NotFilled"
                v-if="subRemarks == '' || subRemarks == null"
              >
                未填写
              </span>
              <span v-else>
                <Tooltip max-width="200" :content="this.goodsData.content">
                  {{ subRemarks }}
                </Tooltip>
              </span>
            </el-descriptions-item>
          </el-descriptions>
          <el-descriptions
            class="margin-top SourcIormation"
            title=""
            size="medium"
            border
          >
            <template slot="extra">
              <Row class="operation"> </Row>
            </template>
            <!-- 地址 -->
            <el-descriptions-item>
              <template slot="label"> 运输时效： </template>
              <span> {{ this.goodsData.prescription }}</span> 小时
            </el-descriptions-item>
            <el-descriptions-item>
              <template slot="label"> 装车时间： </template>
              <div v-if="goodsData.loadingTimeList.length > 0">
                <span
                  v-for="(item, index) in goodsData.loadingTimeList"
                  :key="index"
                >
                  <span class="time-css-box">{{ item }}</span
                  >,&nbsp;
                </span>
              </div>
              <div v-else>
                <span>---</span>
              </div>
            </el-descriptions-item>
          </el-descriptions>

          <!-- 定价方式 -->
          <div style="margin: 20px 0"></div>
          <el-descriptions class="margin-top" :column="4" size="medium" border>
          </el-descriptions>
        </div>
        <!-- 报价表格 -->
        <div style="margin: 10px 0"></div>
        <div></div>
      </div>
      <div style="margin: 10px 0"></div>
    </Card>
    <div class="Cardokbtn" v-if="this.goodsData.status != '0'">
      <div class="okbtn">
        <div style="display: flex; justify-content: space-between">
          <div style="margin-left: 50px">
            <span v-if="this.goodsData.status == '3'">
              &nbsp;
              <Button @click="orderDispatching" type="warning">调度派单</Button>
            </span>

            <span v-if="this.goodsData.status == '3'">
              &nbsp;
              <Button @click="closeSourceOfGoods" type="error">关闭货源</Button>
            </span>
            <span v-if="this.goodsData.status == '4'">
              &nbsp;
              <Button @click="OpenSource" type="primary">开启货源</Button>
            </span>
            <span
              v-if="
                this.goodsData.status == '3' || this.goodsData.status == '4'
              "
            >
              &nbsp;
              <!-- 0待审核 1已拒绝 2待执行 3报价中 4已关闭 5已完结 -1已删除 -->
              <Button @click="CloseSource" type="error"> 完结货源</Button>
            </span>
            <span
              v-if="
                this.goodsData.status == '5' || this.goodsData.status == '-1'
              "
            >
              &nbsp;
              <Button @click="OneMoreOrder" type="primary">再来一单</Button>
            </span>
            <span
              v-if="
                this.goodsData.status == '1' ||
                this.goodsData.status == '3' ||
                this.goodsData.status == '4'
              "
            >
              &nbsp;
              <Button type="primary" @click="OwnerModification"
                >修改货源</Button
              >
            </span>
            <span
              v-if="
                this.goodsData.status == '5' || this.goodsData.status == '1'
              "
            >
              &nbsp;
              <Button @click="deleteOwner" type="error">删除货源</Button>
            </span>
          </div>
          <div
            style="padding-bottom: 10px; padding-right: 30px"
            v-if="this.goodsData.status == '1'"
          >
            拒绝原因：
            <span class="ReasonsFailureAudit">
              {{ this.goodsData.refuseReason }}</span
            >
          </div>
        </div>
      </div>
    </div>
    <!-- 驾驶员详情   -->
    <DriverDetails
      @DriverDetaEnd="DriverDetaEnd"
      :BidderdUserId="BidderdUserId"
      :driverModalue="this.driverModalue"
    >
    </DriverDetails>
    <!-- 货主详情 -->
    <OwnerDetails
      @OwnerDetaiEnd="OwnerDetaiEnd"
      :OwnerDetailsId="OwnerDetailsId"
      :OwnerDetailsModalue="this.OwnerDetailsModalue"
    >
    </OwnerDetails>
    <!-- 车辆详情 -->
    <VehicleDetails
      @VehicleDetailsEnd="VehicleDetailsEnd"
      :VehicleDetailsId="VehicleDetailsId"
      :VehicleDetailsModalue="this.VehicleDetailsModalue"
    >
    </VehicleDetails>
    <!-- 委托 -->
    <Drawer
      :mask-closable="false"
      :title="upwardQuotationTitle"
      width="600"
      v-model="upwardQuotationModal"
    >
      <List :border="false" :split="false" header="" footer="" size="small">
        <div style="margin-bottom: 3px">
          <span class="driverList-goods">报价信息</span>
        </div>
        <div style="display: flex">
          <div style="width: 220px">
            <ListItem>
              <span>报价编号</span>
              <span class="listMomoney-goods">{{
                entrustData.quotationNo
              }}</span>
            </ListItem>
            <ListItem>
              <span style="margin-left: 14px">报价人</span>
              <span
                style="
                  color: #08c;
                  cursor: pointer;
                  margin-left: 15px;
                  font-weight: 600;
                "
                @click="BidderdDiver(entrustData)"
                >{{ entrustData.name }}</span
              >
            </ListItem>
          </div>

          <div style="margin-left: 70px">
            <ListItem>
              <span>报价时间</span>
              <span class="listMomoney-goods">{{
                entrustData.createTime
              }}</span>
            </ListItem>
            <ListItem>
              <span>报价备注</span>
              <span
                class="listMomoney-goods"
                v-if="entrustData.remarks != null && entrustData.remarks != ''"
                >{{ entrustData.remarks }}</span
              >
              <span class="listMomoney-goods" style="color: #a9a9a9"
                >未填写</span
              >
            </ListItem>
          </div>
        </div>
        <div style="display: flex">
          <div style="width: 220px">
            <ListItem>
              <span>拟承运量</span>
              <span class="listMomoney-goods"
                >{{ upwardQuotationForm.transGoodWeight }}
              </span>

              <span style="margin-left: 4px"> 吨 </span>
              <span class="listMomoney-goods">{{
                upwardQuotationForm.volume != null &&
                upwardQuotationForm.volume != ""
                  ? upwardQuotationForm.volume
                  : 0
              }}</span>
              <span style="margin-left: 4px"> m³ </span>
              <span class="listMomoney-goods">
                {{
                  upwardQuotationForm.piece != null &&
                  upwardQuotationForm.piece != ""
                    ? upwardQuotationForm.piece
                    : 0
                }}</span
              >
              <span style="margin-left: 4px"> 件</span>
            </ListItem>
          </div>
          <div style="margin-left: 70px">
            <ListItem>
              <span>当前报价</span>
              <span style="color: #dc143c" class="listMomoney-goods">
                {{ upwardQuotationForm.freightUnitPrice }}</span
              >
              <span style="margin-left: 4px">元</span>
              <span style="color: #dc143c" class="listMomoney-goods">
                {{ upwardQuotationForm.freightTotalPrice }}</span
              >
              <span style="margin-left: 4px">元</span>
            </ListItem>
          </div>
        </div>
        <div class="linx-goods"></div>
        <div style="margin-left: 6px; margin-bottom: 7px">
          <span class="driverList-goods">其他信息</span>
        </div>
        <Form
          :label-width="80"
          ref="entrustFrom"
          :model="entrustFrom"
          :rules="entrustRuleIn"
          inline
        >
          <div style="display: flex">
            <div style="width: 200px">
              <FormItem label="发货单位" prop="extractName">
                <Input
                  :min="0"
                  style="width: 185px"
                  v-model="entrustFrom.extractName"
                  placeholder="请输入发货单位"
                >
                </Input>
              </FormItem>
            </div>
            <div style="margin-left: 87px">
              <FormItem label="联系电话" prop="extractPhone">
                <Input
                  :min="0"
                  style="width: 185px"
                  v-model="entrustFrom.extractPhone"
                  placeholder="请输入联系电话"
                >
                </Input>
              </FormItem>
            </div>
          </div>
          <div>
            <FormItem label="证件号码" prop="loadingIdCard">
              <Input
                :min="0"
                style="width: 185px"
                v-model="entrustFrom.loadingIdCard"
                placeholder="请输入证件号码"
              >
              </Input>
            </FormItem>
          </div>
          <div style="display: flex">
            <div style="width: 200px">
              <FormItem label="收货单位" prop="takeName">
                <Input
                  :min="0"
                  style="width: 185px"
                  v-model="entrustFrom.takeName"
                  placeholder="请输入收货单位"
                >
                </Input>
              </FormItem>
            </div>
            <div style="margin-left: 87px">
              <FormItem label="联系电话" prop="takePhone">
                <Input
                  :min="0"
                  style="width: 185px"
                  v-model="entrustFrom.takePhone"
                  placeholder="请输入联系电话"
                >
                </Input>
              </FormItem>
            </div>
          </div>
          <div>
            <FormItem label="证件号码" prop="idCardOrBusLicenseNo">
              <Input
                :min="0"
                style="width: 185px"
                v-model="entrustFrom.idCardOrBusLicenseNo"
                placeholder="请输入证件号码"
              >
              </Input>
            </FormItem>
          </div>
        </Form>
      </List>
      <div class="demo-drawer-footer">
        <Button style="margin-right: 8px" @click="upwardQuotationModal = false"
          >取消</Button
        >
        <Button
          :loading="loadingbut"
          @click="upwardQuotationDetermine"
          type="primary"
          >确认委托</Button
        >
      </div>
    </Drawer>
    <!-- 签订合同 -->
    <!-- 签署合同 -->
    <Drawer
      :mask-closable="false"
      :title="signContractTitle"
      width="600"
      v-model="signContract"
    >
      <iframe
        style="border: 0"
        :src="this.contractUrl"
        height="620"
        width="100%"
        name="demo"
        scrolling="auto"
        sandbox="allow-same-origin"
      ></iframe>
      <!-- <div style="margin-top: 15px">
        <Input
          :min="0"
          style="width: 250px"
          v-model="contractPassword"
          placeholder="请输入登录密码进行意愿认签"
        >
        </Input>
      </div>

      <div style="margin-top: 5px" class="check">
        <span style="color: red; font-size: 12px; font-weight: 500">
          请输入登录密码进行运输合同的意愿认签</span
        >
      </div> -->
      <div class="demo-drawer-footer">
        <Button style="margin-right: 8px" @click="signContract = false"
          >取消</Button
        >
        <Button
          :loading="loadingSignContractBtn"
          @click="tionSignature"
          type="primary"
          >确认签署</Button
        >
      </div>
    </Drawer>
  </div>
</template>

<script>
import {
  getGoodsDetails, //详情平台接口
} from "@/api/index";
import {
  updateGoodsStatus, //修改货源状态 --- 关闭、开启、完结
  delGoods, //删除货源信息
  companyQuotationRecord, //根据货源获取报价记录
  entrustGoods, //货主委托货源
  signContract,
} from "@/api/ownerEnd/supplyNeed";
import { getStore } from "@/libs/storage";
import DriverDetails from "@/views/componentsonn_source_goods/DriverDetails";
import OwnerDetails from "@/views/componentsonn_source_goods/OwnerDetails";
import VehicleDetails from "@/views/componentsonn_source_goods/VehicleDetails";
import defaultAvatar from "@/assets/customer.png";
export default {
  data() {
    return {
      billMnagement: "",
      defaultAvatar: defaultAvatar, //默认头像
      // 签署合同
      signContract: false,
      signContractTitle: "签署合同",
      contractUrl: "",
      contractPassword: "",
      contractEntrustedId: "",
      loadingSignContractBtn: false,

      entrustData: {},
      subRemarks: "", //备注展示
      getQuotationRecordData: [], //报价单数据

      BidderdUserId: "", //报价人Id
      driverModalue: false, //驾驶员详情弹框

      OwnerDetailsId: "", //货主Id
      OwnerDetailsModalue: false, //货主详情弹框

      VehicleDetailsId: "", //车辆id
      VehicleDetailsModalue: false, //车辆详情弹框

      loadingclose: false,
      loadingClose: false,
      header: {
        accessToken: getStore("accessToken"),
      },
      accessToken: getStore("accessToken"),
      cargoAvatar: "", //头像
      carrierAvatar: "",
      loadingbut: false, //按钮的加载效果
      AuditFailedModal: false, //审核不审核通过的弹框
      AuditFailedInput: "", //审核不审核通过的原因
      OwnerInformationModal: false, //货主详细信息弹框
      UnitPriceIcon: false, //单价图标
      offerIcon: true, //报价图标
      beginAreaCodeShow: "", //起始县区列表 回显code
      endAreaCodeShow: "", //结束县区列表 回显code
      goodsData: {
        cargoOwnerInfoVo: {},
        platformInfoVo: {},
        loadingTimeList: [],
      },
      companyStateArray: [
        { value: "", label: "全部" },
        { value: "0", label: "待委托" },
        { value: "1", label: "已委托" },
      ],
      companyColumns: [
        {
          title: "抢单编号",
          key: "quotationNo",
          minWidth: 190,
          sortable: false,
        },
        {
          title: "抢单时间",
          key: "createTime",
          minWidth: 175,
          sortable: false,
        },
        {
          title: "抢单人",
          key: "driverName",
          minWidth: 220,
          sortable: false,
          render: (h, params) => {
            {
              return h("div", [
                h(
                  "a",
                  {
                    on: {
                      click: () => {
                        this.LookCargoOwnerInfo1(params.row);
                      },
                    },
                  },
                  params.row.driverName
                ),
              ]);
            }
          },
        },
        {
          title: "当前报价",
          key: "",
          minWidth: 195,
          render: (h, params) => {
            return h("div", [
              h("span", "￥" + params.row.driverUnitPrice),
              h("Divider", {
                props: {
                  type: "vertical",
                },
              }),
              h("span", "￥" + params.row.driverTotalPrice),
            ]);
          },
        },
        {
          title: "向上报价",
          key: "",
          minWidth: 195,
          render: (h, params) => {
            if (params.row.platformTotalPrice == null) {
              return h("div", "未报价");
            } else {
              return h("div", [
                h("span", "￥" + params.row.platformUnitPrice),
                h("Divider", {
                  props: {
                    type: "vertical",
                  },
                }),
                h("span", "￥" + params.row.platformTotalPrice),
              ]);
            }
          },
        },
        {
          title: "拟承运量",
          key: "transGoodWeight",
          minWidth: 200,
          render: (h, params) => {
            let volume = 0;
            let piece = 0;
            if (params.row.volume == null) {
              volume = 0;
            } else {
              volume = params.row.volume;
            }

            if (params.row.piece == null) {
              piece = 0;
            } else {
              piece = params.row.piece;
            }
            return h("div", [
              h("span", params.row.transGoodWeight + "吨"),
              h("Divider", {
                props: {
                  type: "vertical",
                },
              }),
              h("span", volume + " m³"),
              h("Divider", {
                props: {
                  type: "vertical",
                },
              }),
              h("span", piece + " 件"),
            ]);
          },
        },
        {
          title: "备注",
          key: "remarks",
          minWidth: 120,
          tooltip: true,
        },
        {
          title: "变更记录",
          key: "number",
          minWidth: 100,
          render: (h, params) => {
            let text = params.row.number;
            let numlist;
            let placTop = "top";
            if (params.index == 0) {
              placTop = "bottom";
            } else {
              placTop = "top";
            }
            return h(
              "Tooltip",
              {
                props: { placement: "top", maxWidth: "280", transfer: true },
              },
              [
                h("div", {}, text),
                h(
                  "span",
                  {
                    slot: "content",
                  },
                  params.row.details.map((item) => {
                    return <p>{item}</p>;
                  })
                ),
              ]
            );
          },
        },
        {
          title: "操作",
          key: "",
          minWidth: 110,
          sortable: false,
          render: (h, params) => {
            if (params.row.platformState == "0") {
              return h("div", [
                h(
                  "a",
                  {
                    on: {
                      click: () => {
                        if (
                          this.goodsData.status == 3 ||
                          this.goodsData.status == 4 ||
                          this.goodsData.status == 5
                        ) {
                          this.companyData = params.row;
                          this.sourceEntrustment = true;
                          // this.EntrustedDriver(params.row);
                        } else {
                          this.$Message.warning("当前状态不可操作");
                        }
                      },
                    },
                    style: {
                      color: "#5892EB",
                    },
                  },
                  "委托"
                ),
              ]);
              // return h("div", [
              //   h(
              //     "a",
              //     {
              //       on: {
              //         click: () => {
              //           if (
              //             this.goodsData.status == 3 ||
              //             this.goodsData.status == 4
              //           ) {
              //             this.upwardQuotationClick(params.row);
              //           } else {
              //             this.$Message.warning("当前状态不可操作");
              //           }
              //         },
              //       },
              //       style: {
              //         color: "#FF8C00",
              //       },
              //     },
              //     "向上报价"
              //   ),
              // ]);
            } else if (params.row.platformState == "1") {
              return h("div", [
                h(
                  "a",
                  {
                    on: {
                      click: () => {
                        if (
                          this.goodsData.status == 3 ||
                          this.goodsData.status == 4
                        ) {
                          this.editupwardQuotation(params.row);
                        } else {
                          this.$Message.warning("当前状态不可操作");
                        }
                      },
                    },
                    style: {
                      color: "#FF0000",
                    },
                  },
                  "修改"
                ),
              ]);
            } else if (params.row.platformState == "2") {
              return h("div", [
                h(
                  "a",
                  {
                    on: {
                      click: () => {
                        if (
                          this.goodsData.status == 3 ||
                          this.goodsData.status == 4 ||
                          this.goodsData.status == 5
                        ) {
                          this.companyData = params.row;
                          this.sourceEntrustment = true;
                          // this.EntrustedDriver(params.row);
                        } else {
                          this.$Message.warning("当前状态不可操作");
                        }
                      },
                    },
                    style: {
                      color: "#5892EB",
                    },
                  },
                  "委托"
                ),
              ]);
            } else if (params.row.platformState == "3") {
              return h("div", [
                h(
                  "a",
                  {
                    on: {
                      click: () => {
                        //查看运单详情
                      },
                    },
                    style: {
                      color: "#666666",
                    },
                  },
                  "已委托"
                ),
              ]);
            }
          },
        },
      ],
      driverColumns: [
        {
          title: "抢单编号",
          key: "quotationNo",
          minWidth: 190,
          sortable: false,
        },
        {
          title: "抢单时间",
          key: "createTime",
          minWidth: 175,
          sortable: false,
        },
        {
          title: "抢单人",
          key: "driverName",
          minWidth: 120,
          sortable: false,
          render: (h, params) => {
            {
              return h("div", [
                h(
                  "a",
                  {
                    on: {
                      click: () => {
                        this.BidderdDiver(params.row);
                      },
                    },
                  },
                  params.row.driverName
                ),
              ]);
            }
          },
        },
        {
          title: "车辆",
          key: "vehicleNum",
          minWidth: 120,
          render: (h, params) => {
            {
              return h("div", [
                h(
                  "a",
                  {
                    on: {
                      click: () => {
                        this.LookVehicleInfo(params.row);
                      },
                    },
                  },
                  params.row.vehicleNum
                ),
              ]);
            }
          },
        },
        {
          title: "当前报价",
          key: "",
          minWidth: 195,
          render: (h, params) => {
            return h("div", [
              h("span", "￥" + params.row.driverUnitPrice),
              h("Divider", {
                props: {
                  type: "vertical",
                },
              }),
              h("span", "￥" + params.row.driverTotalPrice),
            ]);
          },
        },
        {
          title: "向上报价",
          key: "",
          minWidth: 195,
          render: (h, params) => {
            if (params.row.platformTotalPrice == null) {
              return h("div", "未报价");
            } else {
              return h("div", [
                h("span", "￥" + params.row.platformUnitPrice),
                h("Divider", {
                  props: {
                    type: "vertical",
                  },
                }),
                h("span", "￥" + params.row.platformTotalPrice),
              ]);
            }
          },
        },
        {
          title: "拟承运量",
          key: "transGoodWeight",
          minWidth: 200,
          render: (h, params) => {
            let volume = 0;
            let piece = 0;
            if (params.row.volume == null) {
              volume = 0;
            } else {
              volume = params.row.volume;
            }

            if (params.row.piece == null) {
              piece = 0;
            } else {
              piece = params.row.piece;
            }
            return h("div", [
              h("span", params.row.transGoodWeight + "吨"),
              h("Divider", {
                props: {
                  type: "vertical",
                },
              }),
              h("span", volume + " m³"),
              h("Divider", {
                props: {
                  type: "vertical",
                },
              }),
              h("span", piece + " 件"),
            ]);
          },
        },
        {
          title: "备注",
          key: "remarks",
          minWidth: 120,
          tooltip: true,
        },
        {
          title: "变更记录",
          key: "number",
          minWidth: 100,
          render: (h, params) => {
            let text = params.row.number;
            let numlist;
            let placTop = "top";
            if (params.index == 0) {
              placTop = "bottom";
            } else {
              placTop = "top";
            }
            return h(
              "Tooltip",
              {
                props: { placement: "top", maxWidth: "280", transfer: true },
              },
              [
                h("div", {}, text),
                h(
                  "span",
                  {
                    slot: "content",
                  },
                  params.row.details.map((item) => {
                    return <p>{item}</p>;
                  })
                ),
              ]
            );
          },
        },
        {
          title: "操作",
          key: "",
          minWidth: 110,
          sortable: false,
          render: (h, params) => {
            if (params.row.platformState == "0") {
              return h("div", [
                h(
                  "a",
                  {
                    on: {
                      click: () => {
                        if (
                          this.goodsData.status == 3 ||
                          this.goodsData.status == 4 ||
                          this.goodsData.status == 5
                        ) {
                          this.companyData = params.row;
                          this.sourceEntrustment = true;
                          // this.EntrustedDriver(params.row);
                        } else {
                          this.$Message.warning("当前状态不可操作");
                        }
                      },
                    },
                    style: {
                      color: "#5892EB",
                    },
                  },
                  "委托"
                ),
              ]);
              // return h("div", [
              //   h(
              //     "a",
              //     {
              //       on: {
              //         click: () => {
              //           if (
              //             this.goodsData.status == 3 ||
              //             this.goodsData.status == 4
              //           ) {
              //             this.upwardQuotationClick(params.row);
              //           } else {
              //             this.$Message.warning("当前状态不可操作");
              //           }
              //         },
              //       },
              //       style: {
              //         color: "#FF8C00",
              //       },
              //     },
              //     "向上报价"
              //   ),
              // ]);
            } else if (params.row.platformState == "1") {
              return h("div", [
                h(
                  "a",
                  {
                    on: {
                      click: () => {
                        if (
                          this.goodsData.status == 3 ||
                          this.goodsData.status == 4
                        ) {
                          this.editupwardQuotation(params.row);
                        } else {
                          this.$Message.warning("当前状态不可操作");
                        }
                      },
                    },
                    style: {
                      color: "#FF0000",
                    },
                  },
                  "修改"
                ),
              ]);
            } else if (params.row.platformState == "2") {
              return h("div", [
                h(
                  "a",
                  {
                    on: {
                      click: () => {
                        if (
                          this.goodsData.status == 3 ||
                          this.goodsData.status == 4 ||
                          this.goodsData.status == 5
                        ) {
                          this.companyData = params.row;
                          this.sourceEntrustment = true;
                          // this.EntrustedDriver(params.row);
                        } else {
                          this.$Message.warning("当前状态不可操作");
                        }
                      },
                    },
                    style: {
                      color: "#5892EB",
                    },
                  },
                  "委托"
                ),
              ]);
            } else if (params.row.platformState == "3") {
              return h("div", [
                h(
                  "a",
                  {
                    on: {
                      click: () => {
                        //查看运单详情
                      },
                    },
                    style: {
                      color: "#666666",
                    },
                  },
                  "已委托"
                ),
              ]);
            }
          },
        },
      ],
      // 委托
      upwardQuotationTitle: "报价委托",
      upwardQuotationModal: false, //委托弹框
      freightUnitPriceStatus: false,
      freightTotalPriceStatus: false,
      entrustFrom: {
        extractName: "",
        extractPhone: "",
        loadingIdCard: "",

        takeName: "",
        takePhone: "",
        idCardOrBusLicenseNo: "",
      },

      entrustRuleIn: {
        takePhone: [
          {
            required: true,
            message: "输入收货方电话",
            trigger: "blur",
          },
        ],
        loadingIdCard: [
          {
            required: true,
            message: "统一社会信用代码/身份证号",
            trigger: "blur",
          },
          {
            validator: this.Validate.IDCreditCode,
            trigger: "blur",
          },
        ],
        idCardOrBusLicenseNo: [
          {
            required: true,
            message: "统一社会信用代码/身份证号",
            trigger: "blur",
          },
          {
            validator: this.Validate.IDCreditCode,
            trigger: "blur",
          },
        ],
        extractName: [
          {
            required: true,
            message: "输入提货联系人",
            trigger: "blur",
          },
        ],
        extractPhone: [
          {
            required: true,
            message: "输入提货联系人电话",
            trigger: "blur",
          },
        ],
        takeName: [
          {
            required: true,
            message: "输入收货方单位",
            trigger: "blur",
          },
        ],
      },
      upwardQuotationForm: {
        quotationNo: "",
        quotationRecordId: "",
        goodsId: "",
        freightUnitPrice: "",
        freightTotalPrice: "",
        transGoodWeight: "",
        volume: "",
        piece: "",
        remarks: "",
      },
      quotationColumns: [],
      columns: [
        {
          title: "报价编号",
          key: "quotationNo",
          minWidth: 190,
          sortable: false,
        },
        {
          title: "报价时间",
          key: "createTime",
          minWidth: 175,
          sortable: false,
        },
        {
          title: "报价人",
          key: "name",
          minWidth: 150,
          sortable: false,
          render: (h, params) => {
            {
              return h("div", [
                h(
                  "a",
                  {
                    on: {
                      click: () => {
                        this.BidderdDiver(params.row);
                      },
                    },
                  },
                  params.row.name
                ),
              ]);
            }
          },
        },
        {
          title: "车辆",
          key: "vehicleNum",
          minWidth: 120,
          render: (h, params) => {
            {
              return h("div", [
                h(
                  "a",
                  {
                    on: {
                      click: () => {
                        this.LookVehicleInfo(params.row);
                      },
                    },
                  },
                  params.row.vehicleNum
                ),
              ]);
            }
          },
        },
        {
          title: "当前报价",
          key: "",
          minWidth: 220,
          render: (h, params) => {
            return h("div", [
              h("span", "￥" + params.row.freightUnitPrice),
              h("Divider", {
                props: {
                  type: "vertical",
                },
              }),
              h("span", "￥" + params.row.freightTotalPrice),
            ]);
          },
        },

        {
          title: "拟承运量",
          key: "transGoodWeight",
          minWidth: 220,
          render: (h, params) => {
            let volume = 0;
            let piece = 0;
            if (params.row.volume == null) {
              volume = 0;
            } else {
              volume = params.row.volume;
            }

            if (params.row.piece == null) {
              piece = 0;
            } else {
              piece = params.row.piece;
            }
            return h("div", [
              h("span", params.row.transGoodWeight + "吨"),
              h("Divider", {
                props: {
                  type: "vertical",
                },
              }),
              h("span", volume + " m³"),
              h("Divider", {
                props: {
                  type: "vertical",
                },
              }),
              h("span", piece + " 件"),
            ]);
          },
        },
        {
          title: "备注",
          key: "remarks",
          minWidth: 140,
          tooltip: true,
          render: (h, params) => {
            let text = params.row.remarks;
            if (!text || text == "") {
              text = "未填写";
            }
            let placTop = "top";
            if (params.index == 0) {
              placTop = "bottom";
            } else {
              placTop = "top";
            }
            return h(
              "Tooltip",
              {
                props: {
                  maxWidth: "120",
                  placement: placTop,
                  content: text,
                  transfer: true,
                },
              },
              [
                h(
                  "div",
                  {
                    style: {
                      display: "inline-block",
                      width: params.column._width * 0.6 + "px",
                      overflow: "hidden",
                      textOverflow: "ellipsis",
                      whiteSpace: "nowrap",
                      color: "#a9a9a9",
                    },
                  },
                  text
                ),
              ]
            );
          },
        },
        {
          title: "变更记录",
          key: "number",
          minWidth: 100,
          render: (h, params) => {
            let text = params.row.number;
            return h(
              "Tooltip",
              {
                props: { placement: "top", maxWidth: "280", transfer: true },
              },
              [
                h("div", {}, text),
                h(
                  "span",
                  {
                    slot: "content",
                  },
                  params.row.details.map((item) => {
                    return <p>{item}</p>;
                  })
                ),
              ]
            );
          },
        },
        {
          title: "操作",
          key: "",
          minWidth: 100,
          sortable: false,
          render: (h, params) => {
            if (params.row.companyState == "0") {
              return h("div", [
                h(
                  "a",
                  {
                    on: {
                      click: () => {
                        this.upwardQuotationClick(params.row);
                      },
                    },
                    style: {
                      color: "#5892EB",
                    },
                  },
                  "委托"
                ),
              ]);
            } else if (params.row.companyState == "1") {
              return h("div", [
                h(
                  "a",
                  {
                    on: {
                      click: () => {
                        //运单详情
                        // this.upwardQuotationClick(params.row);
                      },
                    },
                    style: {
                      color: "#666666",
                    },
                  },
                  "已委托"
                ),
              ]);
            }
          },
        },
      ],
      data: [],

      searchForm: {
        // 搜索框初始化对象
        pageNumber: 1, // 当前页数
        pageSize: 5, // 页面大小
        sort: "", // 默认排序字段
        order: "", // 默认排序方式
        orderGoodsId: "",
        grabOrdersType: "",
      },
      // data: [], // 表单数据
      pageNumber: 1, // 当前页数
      pageSize: 5, // 页面大小
      total: 0, // 表单数据总数
      OwnerInformationRow: "",
      rowGoodId: "",
    };
  },
  components: {
    DriverDetails,
    OwnerDetails,
    VehicleDetails,
  },
  created() {},
  mounted() {
    this.rowGoodId = JSON.parse(this.$route.query.key);
    this.init();
    this.quotationColumns = this.columns;
  },
  methods: {
    init() {
      this.getDataList();
      // this.QuotationRecordList();
    },
    driverCompanyTabs(val) {
      if (val == "driverName") {
        this.searchForm.grabOrdersType = "2";
      } else {
        this.searchForm.grabOrdersType = "1";
      }
      this.QuotationRecordList();
    },
    ////根据货源获取报价记录
    QuotationRecordList() {
      this.searchForm.companyState = "";
      this.searchForm.orderGoodsId = this.rowGoodId.goodId;
      companyQuotationRecord(this.searchForm).then((res) => {
        if (res.code == 200) {
          if (res.result.records.length > 0) {
            this.getQuotationRecordData = res.result.records;
            this.total = res.result.total;
            this.columns = this.quotationColumns;
            // console.log(this.OwnerInformationRow.business,
            // this.getQuotationRecordData.business);
            // if (this.OwnerInformationRow.business == "1") {
            //   this.columns = this.columns.filter(
            //     (col) => col.key !== "vehicleNum"
            //   );
            // }
            if (
              this.getQuotationRecordData.length == 0 &&
              this.searchForm.pageNumber > 1
            ) {
              this.searchForm.pageNumber -= 1;
              this.QuotationRecordList();
            }
          } else {
            this.getQuotationRecordData = [];
          }
        } else {
          this.$Message.error(res.message);
        }
      });
    },
    // 删除驾驶员
    DeleteDriver(event, name) {
      const index = this.TagList.indexOf(name);
      this.TagList.splice(index);
    },
    getDataList() {
      this.subRemarks = "";
      getGoodsDetails({ goodsid: this.rowGoodId.goodId }).then((res) => {
        if (res.code == 200) {
          this.goodsData = res.result;
          this.beginAreaCodeShow =
            this.goodsData.beginProvinceName +
            this.goodsData.beginCityName +
            this.goodsData.beginAreaName;
          this.endAreaCodeShow =
            this.goodsData.endProvinceName +
            this.goodsData.endCityName +
            this.goodsData.endAreaName;

          if (this.goodsData.cargoOwnerInfoVo.avatar) {
            if (this.goodsData.cargoOwnerInfoVo.avatar.indexOf(":") !== -1) {
              this.cargoAvatar = this.defaultAvatar;
            } else {
              this.cargoAvatar =
                this.$baseUrl + this.goodsData.cargoOwnerInfoVo.avatar;
            }
          } else {
            this.cargoAvatar = this.defaultAvatar;
          }
          // if (this.goodsData.platformInfoVo.avatar) {
          //   if (
          //     this.goodsData.platformInfoVo.avatar.indexOf(":") !==
          //     -1
          //   ) {
          //     this.carrierAvatar = this.defaultAvatar;
          //   } else {
          //     this.carrierAvatar =
          //       this.$baseUrl +
          //       "/freight/file/view/" +
          //       this.goodsData.platformInfoVo.avatar +
          //       "?accessToken=" +
          //       this.accessToken +
          //       "&preview=true";
          //   }
          // } else {
          //   this.carrierAvatar = this.defaultAvatar;
          // }
          if (this.goodsData.content != null) {
            if (this.goodsData.content.length >= 15) {
              let text1 = this.goodsData.content.substring(0, 10);
              this.subRemarks = `${text1}....`;
            } else {
              this.subRemarks = this.goodsData.content;
            }
          }
        } else {
          this.$Message.error(res.message);
        }
      });
    },

    // 修改订单
    ModifyQuotation() {},
    // 委托
    upwardQuotationClick(row) {
      if (this.goodsData.pricingMethod == 1) {
        //定价
        if (this.goodsData.pricingType == 1) {
          //按单价
          this.upwardQuotationForm.freightUnitPrice =
            this.goodsData.freightUnitPrice;
          this.upwardQuotationForm.freightTotalPrice =
            Math.floor(
              this.goodsData.freightUnitPrice * row.transGoodWeight * 100
            ) / 100;
        } else {
          //按整单
          this.upwardQuotationForm.freightUnitPrice =
            Math.floor(
              (this.goodsData.estimateAmt / row.transGoodWeight) * 100
            ) / 100;
          this.upwardQuotationForm.freightTotalPrice =
            this.goodsData.estimateAmt;
        }
      } else {
        //竞价
        if (this.goodsData.pricingType == 1) {
          //按单价
          this.upwardQuotationForm.freightUnitPrice =
            this.goodsData.maximumFreight;

          this.upwardQuotationForm.freightTotalPrice =
            Math.floor(
              this.goodsData.maximumFreight * row.transGoodWeight * 100
            ) / 100;
        } else {
          //按整单

          this.upwardQuotationForm.freightUnitPrice =
            Math.floor(
              (this.goodsData.maximumFreight / row.transGoodWeight) * 100
            ) / 100;
          this.upwardQuotationForm.freightTotalPrice =
            this.goodsData.maximumFreight;
        }
      }
      this.upwardQuotationForm.transGoodWeight = row.transGoodWeight;
      this.upwardQuotationForm.piece = row.piece;
      this.upwardQuotationForm.volume = row.volume;

      this.upwardQuotationForm.goodsId = this.goodsData.goodId;
      this.entrustData = row;
      this.upwardQuotationModal = true;
      this.upwardQuotationTitle = "报价委托";

      this.entrustFrom.extractName = this.goodsData.extractName;
      this.entrustFrom.extractPhone = this.goodsData.extractPhone;
      this.entrustFrom.loadingIdCard = this.goodsData.loadingIdCard;
      this.entrustFrom.takeName = this.goodsData.takeName;
      this.entrustFrom.takePhone = this.goodsData.takePhone;
      this.entrustFrom.idCardOrBusLicenseNo =
        this.goodsData.idCardOrBusLicenseNo;
      this.entrustFrom.quotationRecordId = row.quotationRecordId;
    },
    // 确定委托
    upwardQuotationDetermine() {
      this.$refs.entrustFrom.validate((valid) => {
        if (valid) {
          this.loadingbut = true;
          for (var key in this.entrustFrom) {
            if (this.entrustFrom[key] == null) {
              this.entrustFrom[key] = "";
            }
          }
          entrustGoods(this.entrustFrom).then((res) => {
            this.loadingbut = false;
            if (res.code == 200) {
              if (this.OwnerInformationRow.business == "1") {
                this.notSigned(res.result);
              } else {
                this.$Message.success("委托成功"); //承运的不用报委托成功，撮合的用
              }
              this.init();
              this.upwardQuotationModal = false;
            } else {
              this.$Message.error(res.message);
            }
          });
        }
      });
    },
    // 未签署合同
    notSigned(entrustedId) {
      this.contractPassword = "";
      this.contractEntrustedId = entrustedId;
      this.signContract = true;
      this.contractUrl =
        this.$baseUrl +
        "/freight/system/companyContract?goodsId=" +
        entrustedId +
        "&accessToken=" +
        this.accessToken +
        "&preview=true";
    },
    // 确定签署
    tionSignature() {
      if (this.contractPassword == "") {
        return this.$Message.warning("请输入登录密码进行意愿认证");
      }
      this.loadingSignContractBtn = true;
      let data = {
        goodsId: this.contractEntrustedId,
        password: this.contractPassword,
      };
      this.$Message.success("合同签署成功");
      this.signContract = false;
      this.loadingSignContractBtn = false;
      // signContract(data).then((res) => {
      //   this.loadingSignContractBtn = false;
      //   if (res.code == 200) {
      //     this.$Message.success("合同签署成功");
      //     this.signContract = false;
      //   } else {
      //     this.$Message.error(res.message);
      //   }
      // });
    },
    // 合同编号
    DispatchOrder() {
      let pdf = "";
      pdf =
        this.$baseUrl +
        "/freight/file/view/" +
        this.goodsData.contractId +
        "?accessToken=" +
        this.accessToken +
        "&preview=true";
      window.open(pdf, "_blank");
    },
    // 请选择报价状态
    companyChange(val) {
      if (val == undefined) {
        this.searchForm.companyState = "";
      } else {
        this.searchForm.companyState = val;
      }
      this.loading = true;
      companyQuotationRecord(this.searchForm).then((res) => {
        this.loading = false;
        if (res.code == 200) {
          if (res.result.records.length > 0) {
            this.getQuotationRecordData = res.result.records;
          } else {
            this.getQuotationRecordData = [];
          }
        } else {
          this.$Message.error(res.message);
        }
      });
    },
    // 单价排序
    UnitPriceorting() {
      //1将 2升
      this.UnitPriceIcon = !this.UnitPriceIcon;
      if (this.UnitPriceIcon) {
        this.searchForm.priceSort = "2";
      } else {
        this.searchForm.priceSort = "1";
      }
      this.loading = true;
      companyQuotationRecord(this.searchForm).then((res) => {
        if (res.code == 200) {
          this.loading = false;
          if (res.result.records.length > 0) {
            this.getQuotationRecordData = res.result.records;
          } else {
            this.getQuotationRecordData = [];
          }
        } else {
          this.$Message.error(res.message);
        }
      });
    },
    // 撤销货源
    cancelSource() {
      this.$Modal.confirm({
        title: "确认撤销",
        content: "确认撤销货源编号为 " + this.goodsData.goodNo + " 的货源吗？",
        loading: true,
        onOk: () => {
          updateGoodsStatus({
            goodId: this.goodsData.goodId,
            status: 6,
          }).then((res) => {
            this.$Modal.remove();
            if (res.code == 200) {
              this.$Message.success("撤销成功");
              this.init();
            } else {
              this.$Message.error(res.message);
            }
          });
        },
      });
    },

    // 再来一单
    OneMoreOrder() {
      this.$router.push({
        name: "oneMoreOrderOwner",
        query: {
          key: this.$route.query.key,
        },
      });
    },
    //删除货源
    deleteOwner() {
      this.$Modal.confirm({
        title: "确认删除",
        content: "确认删除货源编号为 " + this.goodsData.goodNo + " 货源吗？",
        loading: true,
        onOk: () => {
          delGoods({ goodId: this.goodsData.goodId }).then((res) => {
            this.$Modal.remove();
            if (res.code == 200) {
              this.$Message.success("删除成功");
              this.$router.push({
                name: "ownerManagement/supply-damin/goods-admin/goodsList",
                query: { key: this.$route.query.key },
              });
            } else {
              this.$Message.error(res.message);
            }
          });
        },
      });
    },
    // 返回
    goBack() {
      this.$router.push({
        name: "ownerManagement/supply-damin/goods-admin/goodsList",
        query: {
          key: this.$route.query.key,
          EchoProvinceCityCounty: this.$route.query.EchoProvinceCityCounty,
        },
      });
    },
    // 修改货源
    OwnerModification() {
      this.$nextTick(() => {
        this.$router.push({
          name: "editGoods",
          query: {
            key: this.$route.query.key,
          },
        });
      });
    },
    // 重新发布
    newRelease() {
      this.$nextTick(() => {
        this.$router.push({
          name: "editGoods",
          query: {
            key: this.$route.query.key,
            newNum: 1,
          },
        });
      });
    },
    // /完结货源
    CloseSource() {
      this.$Modal.confirm({
        title: "确认完结",
        content: "确认完结该货源吗？",
        loading: true,
        onOk: () => {
          updateGoodsStatus({
            goodId: this.goodsData.goodId,
            status: 5,
          }).then((res) => {
            this.$Modal.remove();
            if (res.code == 200) {
              this.$Message.success("操作成功");
              this.init();
            } else {
              this.$Message.error(res.message);
            }
          });
        },
      });
    },
    //开启货源
    OpenSource() {
      this.$Modal.confirm({
        title: "确认开启",
        content: "确认开启该货源？",
        loading: true,
        onOk: () => {
          updateGoodsStatus({
            goodId: this.goodsData.goodId,
            status: 3,
          }).then((res) => {
            this.$Modal.remove();
            if (res.code == 200) {
              this.$Message.success("操作成功");
              this.init();
            } else {
              this.$Message.error(res.message);
            }
          });
        },
      });
    },
    // 调度派单
    orderDispatching() {
      this.$router.push({
        name: "dispatchConsignor",
        query: {
          key: this.$route.query.key,
          details: 1,
        },
      });
    },
    //关闭货源
    closeSourceOfGoods() {
      this.$Modal.confirm({
        title: "确认关闭",
        content: "确认关闭该货源？",
        loading: true,
        onOk: () => {
          updateGoodsStatus({
            goodId: this.goodsData.goodId,
            status: 4,
          }).then((res) => {
            this.$Modal.remove();
            if (res.code == 200) {
              this.$Message.success("操作成功");
              this.init();
            } else {
              this.$Message.error(res.message);
            }
          });
        },
      });
    }, // 单价排序
    //货主详细信息
    LookCargoOwnerInfo() {
      this.OwnerDetailsId = this.goodsData.companyUserId;
      this.OwnerDetailsModalue = true;
    },
    // 货主详细信息关闭
    OwnerDetaiEnd(val) {
      this.OwnerDetailsModalue = val;
      this.OwnerDetailsId = "";
    },

    // 查看车辆详细
    LookVehicleInfo(row) {
      this.VehicleDetailsModalue = true;
      this.VehicleDetailsId = row.vehicleId;
    },
    //车辆详细信息关闭
    VehicleDetailsEnd(val) {
      this.VehicleDetailsModalue = val;
      this.VehicleDetailsId = "";
    },
    BidderdDiver(row) {
      if (row.business == "1") {
        this.$Modal.info({
          title: "承运人信息：",
          content: `公司全称： ${row.name}
              <br>公司简称： ${row.abbreviation}
              <br>联系电话： ${row.phone}
            `,
        });
      } else {
        this.BidderdUserId = row.userId;
        this.driverModalue = true;
      }
    },
    // 驾驶员详情关闭
    DriverDetaEnd(val) {
      this.driverModalue = val;
      this.BidderdUserId = "";
    },
    // 表单反页
    changePage(v) {
      this.searchForm.pageNumber = v;
      this.QuotationRecordList();
    },
    changePageSize(v) {
      this.searchForm.pageSize = v;
      this.QuotationRecordList();
    },
  },
};
</script>

<style lang="less">
.InputNuspanfont {
  position: absolute;
  top: 2px;
  right: -45px;
  width: 50px;
  height: 31px;
  padding: 7px 0 0 0;
  text-align: center;
  line-height: 60px;
  font-size: inherit;
  font-weight: 400;
  line-height: 1;
  color: #515a6e;
  text-align: center;
  border-radius: 4px;
}
.my-content {
  width: 100px;
}
.my-limitation {
  width: 170px;
}
.Line {
  border: 0;
  border-top: 1px solid #eee;
  border-top-width: 1px;
  border-top-style: solid;
  border-top-color: rgb(238, 238, 238);
  border-bottom: 1px solid #fff;
  border-bottom-width: 1px;
  border-bottom-style: solid;
  border-bottom-color: rgb(255, 255, 255);
  margin: 20px 0;
}
.Ownerdw {
  margin-left: 20px;
  // height: 80px;
  display: flex;
  .Ownerpoit {
    margin-top: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 1px solid #eee;
    img {
      width: 100%;
      height: 100%;
      border-radius: 50%;
      // margin-top: -10px;
    }
  }
  .OwnerName {
    margin-left: 17px;
    padding: 33px 0;
    .OwnerName1 {
      margin-left: 10px;
      color: #999999;
    }
    .Owner-company {
      margin-top: 10px;
      cursor: pointer;
    }
  }
}

.Ownertiem {
  padding: 25px 0;
  margin-top: 2px;
  .statee,
  .implemented,
  .end,
  .refuse,
  .AuditFailed,
  .quotation,
  .deeltes,
  .erreCss {
    width: 50px;
    margin-bottom: 10px;
    background-color: rgb(70, 136, 71);
    color: #fff;
    // line-height: 55px;
    padding: 2px 0;
    text-align: center;
    font-size: 12px;
    margin-left: 9px;
    border-radius: 3px;
    display: inline-block;
    margin-left: 27px;
  }
  .quotation {
    background-color: rgb(70, 136, 71);
  }
  .implemented {
    background-color: #2d8cf0;
  }
  .deeltes {
    background-color: #d3d3d3;
  }
  .AuditFailed {
    background-color: #dc143c;
    width: 70px;
    margin-left: 27px;
  }
  .erreCss {
    background-color: #dc143c;
  }
}
.CarrierSource {
  width: 70px;
  margin-bottom: 10px;
  background-color: #808080;
  color: #fff;
  // line-height: 55px;
  padding: 2px 0;
  text-align: center;
  font-size: 12px;
  margin-left: 25px;
  border-radius: 3px;
  display: inline-block;
}
.butTable {
  width: 100%;
  padding: 5px;
  // border: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  // background-color: #f8f8f9;
  .butTableoffer {
    font-size: 16px;
    font-weight: 700;
    margin-top: 5px;
    margin-left: 5px;
    font-size: 16px;
    margin-bottom: 6px;
    span {
      font-size: 14px;
      font-weight: 400;
      // color: #909399;
    }
  }
}
.Cardokbtn {
  position: relative;
  bottom: -5px;
  left: 0;
}
.okbtn {
  z-index: 99999;
  width: 100%;
  margin-top: -15px;
  background-color: #f5f5f5;
  border: 1px solid #cdcdcd;
  height: 70px;
  line-height: 70px;
}
.ReasonRejection {
  color: #08c;
  margin-top: -14px;
  margin-right: 130px;
}
.ReasonsFailureAudit {
  color: red;
}
.ListItemcss {
  height: 200px;
  overflow: auto;
}
.ListItemMetacss {
  margin-left: 40px;
}
.ListItemMetac1 {
  width: 350px;
  margin-left: 110px;
  color: #999999;
  font-size: 10px;
}
.el-descriptions__header {
  margin-bottom: 10px;
}
.NotFilled {
  font-size: 14px;
  color: #a9a9a9;
}
.LengthvehicleType {
  width: 250px;
}
.TagModal {
  float: left;
  margin: 5px;
}
.driverList-goods {
  color: #333;
  font-size: 15px;
  font-weight: 600;
}
.listMoney-goods {
  margin-left: 15px;
}
.listMoney-goodss {
  margin-left: 15px;
  font-weight: 600;
  color: #ed4014;
}
.listMomoney-goods {
  margin-left: 15px;
  font-weight: 600;
}
.demo-drawer-footer {
  width: 100%;
  position: absolute;
  bottom: 0;
  left: 0;
  border-top: 1px solid #e8e8e8;
  padding: 10px 16px;
  text-align: right;
  background: #fff;
}
.linx-goods {
  margin-top: 8px;
  margin-bottom: 16px;
  border-top: 1px solid #ccc;
}
.table table {
  // table-layout: auto;
  width: 100% !important;
}
.Line {
  // border-bottom: 1px solid #eee;
  // border-bottom-color: rgb(255, 255, 255);
  border: 0;
  border-top: 1px solid #eee;
  border-top-width: 1px;
  border-top-style: solid;
  border-top-color: rgb(238, 238, 238);
  border-bottom: 1px solid #fff;
  border-bottom-width: 1px;
  border-bottom-style: solid;
  border-bottom-color: rgb(255, 255, 255);
  margin: 20px 0;
}
.newcarrier {
  margin-top: 10px;
  margin-left: 20px;
  display: flex;
  .Ownerportrait {
    margin-top: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 1px solid #eee;
    img {
      width: 100%;
      height: 100%;
      border-radius: 50%;
    }
  }
  .carrierName {
    margin-left: 17px;
    padding: 25px 0;
    .carrierName1 {
      margin-left: 10px;
      color: #999999;
    }
    .Owner-company {
      margin-top: 10px;
      cursor: pointer;
    }
  }
}
.carrier {
  position: relative;
  top: -10px;
  left: 50px;
  font-size: 14px;
  font-weight: 600;
}
.Ownerdw-shipper {
  position: absolute;
  top: 60px;
  left: 42px;
  font-size: 14px;
  font-weight: 600;
}
.time-css-box {
  border: 1px solid #eee;
  padding: 9px;
  border-radius: 5px;
  background-color: #ecf5ff;
  border-color: #d9ecff;
}
</style>
